<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateGridAssessTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('grid_assess', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('grid_id')->default(0)->comment('网格id');
            $table->decimal('total_price',10,2)->default(0)->comment('评估补偿费总价');
            $table->decimal('unit_price',10,2)->default(0)->comment('土地使用权价值');
            $table->decimal('attach_fee',10,2)->default(0)->comment('附着物补偿费');
            $table->decimal('stop_fee',10,2)->default(0)->comment('停产停业补仓金');
            $table->decimal('subsidy_fee',10,2)->default(0)->comment('搬迁补助费');
            $table->string('remarks')->default('')->comment('备注');
            $table->string('assess_imgs')->default('')->comment('评估照片');
            $table->integer('do_user_id')->default(0)->comment('操作者id');
            $table->text('content')->comment('内容');
            $table->timestamps();
            $table->softDeletes();
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `grid_assess` comment '评估表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('grid_assess');
    }
}
